// 定义路由规则（路径对应哪个组件）
import { createRouter, createWebHistory } from 'vue-router' 
import Dashboard from '@/views/Dashboard.vue'
const routes = [
    //重定向
    {
        path: '/',
        redirect: '/dashboard'
    },
    //总览面板路由
    {
        path: '/dashboard',
        name: 'Dashboard',
        component: Dashboard
    },
]

const router = createRouter({
    history: createWebHistory(),
    routes
})

export default router